<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSwipersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('swipers', function (Blueprint $table) {
            $table->id();
            $table->tinyInteger('display_position')->comment('展示位置');
            $table->string('image')->comment('图片');
            $table->string('description')->nullable()->comment('说明文案');
            $table->string('jump_type')->comment('跳转类型');
            $table->string('jump_value')->comment('跳转值');
            $table->dateTime('begin_time')->comment('起始时间');
            $table->dateTime('end_time')->comment('结束时间');
            $table->integer('display_order')->comment('展示顺序');

            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('swipers');
    }
}
